<table class="table table-bordered">
    <thead>
    <tr>
        <th>#</th>
        <th>用户名称</th>
        <th>昵称</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {% for user in pagination %}
        <tr>
            <th scope="row">{{ user.id }}</th>
            <td>{{ user.username }}</td>
            <td>{{ user.nickname }}</td>
            <td>
                {% if user.id > 1 %}
                    {% if hasPermission('USER_EDIT') %}
                    <a href="{{ path(constant_route('USER_EDIT'), {id : user.id}) }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i> 编辑</a>
                    {% endif %}
                    {% if hasPermission('USER_DELETE') %}
                    <button type="button" class="btn btn-danger btn-xs table-confirm-change-status" data-url="{{ path(constant_route('USER_DELETE'), {'id' : user.id}) }}"><i class="fa fa-trash"></i> 删除</button>
                    {% endif %}
                {% endif %}
            </td>
        </tr>
    {% endfor %}
    </tbody>
</table>
{{ knp_pagination_render(pagination) }}